Repository navigation
feat: cortex sync-runs — run status from a campaign digest (hpc-campaign p5b) - #83
Merged
Merged
Conversation
…cision 64) `cortex.py sync-runs <project> --digest <digest.json> [--dry-run]` reads a PyAutoFit autofit.campaign digest and the tasks.jsonl beside it, matches run lines by SLURM job id (narrowed to the array indices the ident names), flips open -> running with a run entry, and calls done with the task counts (wall from first start to last end; failed when none completed) once every matched task has ended. Writes run entries only, never result/lesson/Now; never adds or drops a run it cannot account for; idempotent; first stdout line `sync-runs: <project>: <n> changed`; exit 1 on a malformed digest. projects.yaml gains optional campaign_file and digest (paths relative to local_path), validated by check. REFERENCE.md documents the verb, the key and the boundary (status is a cluster fact; results and lessons are the human's); decision 64 records hpc-campaign ruling F3. Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A pending array slice the scheduler reports as one row (job_id/key 3002_[2-3], optionally %throttle) now stands for each of its indices; a run is done only when every index its ident names has a terminal row, and for a bare job id any unfinished row (compound stubs included) keeps it on the ledger. Counts weigh a compound row by its indices, so cancelled stubs count per task. - Every edit is computed in memory, read back and written once: a refusal or a failed read-back writes nothing. - The log's newest-first rule is checked before any entry is written. Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hpc-campaign phase 5b (#82). Adds
cortex sync-runs <project> --digest <path> [--dry-run], which updates a project's run lines from a PyAutoFit campaign digest (digest.json+tasks.jsonl). This is new decision 64; the epic ledger calls it "decision 62", but 62 and 63 were already taken.runlog entry. It moves todone, with state counts and wall time, once every task index the run names has finished. It is marked failed only when none completed.result,lessonand## Now. It never adds or removes run lines. It is idempotent, and--dry-runwrites nothing.3002_[2-3]). They are expanded into their indices and keep the run open.sync-runs: <project>: <n> changed.projects.yamlgains optionalcampaign_fileanddigest, validated bycortex check.Heart RED override (development only)
Heart was RED at the door on 2026-10-30:
test_fitsable.py::test__output_to_fitsred;The human authorized the Human override for Heart RED (development only) live for hpc-campaign phase 5 ("Override + approve"). This PR doesn't touch any RED item. Merging needs green CI and a separate
/prm.Test plan
tests/91 passed (21 new);cortex checkOK on the real ledgers.Independent review: FINDINGS, fixed in d590eac:
Each has a regression test. The fixes have not been re-reviewed (time-boxed session).
Dry run on a temporary copy against the real DR1 digest: 58 euclid_dr1 runs would close. Applying that to the live ledger needs the human's ask.
Refs #82
🤖 Generated with Claude Code